package cn.itsource.quartz.config;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class PrintTimeJob implements Job {

    //定义具体的任务
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        //获取任务详情里面携带数据
        JobDataMap dataMap = context.getMergedJobDataMap();
        Object o = dataMap.get("msg");
        System.out.println("--------------"+o);
    }
}
